package com.cml.dm.engine.config;


import com.cml.dm.engine.detector.BRStatusDetector;
import com.cml.dm.engine.detector.DefaultBRStatusDetector;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;


@Configuration
@ComponentScan(value = {"com.cml.dm"})
@MapperScan("com.cml.dm.admin.mapper")
public class DmEngineConfig {

    @Bean
    @ConditionalOnMissingBean(BRStatusDetector.class)
    public BRStatusDetector brStatusDetector(){
        DefaultBRStatusDetector defaultBRStatusDetector = new DefaultBRStatusDetector();
        return defaultBRStatusDetector;
    }
}
